<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>{{ .Title }}</title>
    <link rel="stylesheet" type="text/css" href="/static/css/style.css" />
  </head>
  <body>
    <div class="container">
      <h1>{{ .Title }}</h1>

      <p class="subtitle">{{ .Subtitle }}</p>

      <div class="web-ui-upload">
        <h2>Upload via web UI</h2>

        <div class="upload-form">
          <textarea id="upload-textarea"></textarea>

          <div class="button-row">
            <button class="button" id="upload">Upload</button>
          </div>
        </div>

        <div id="result"></div>

        <p id="form-upload-error">&nbsp;</p>
      </div>

      {{ if .ShowDocs }}
        <div class="documentation">
          <div class="bash-example">
            <h2>Upload from the command line</h2>
            <p>Upload text:</p>
            <pre><code id="curl-cmd" class="language-bash"></code></pre>

            <p>Upload a file's contents:</p>
            <pre><code id="curl-file-cmd" class="language-bash"></code></pre>
          </div>

          <div class="js-example">
            <h2>Upload via JavaScript</h2>

            <pre><code id="js-example" class="language-javascript"></code></pre>
          </div>
        </div>
      {{ end }}


      <div id="more-info">
        <h2>Source code</h2>
        <p>
          {{ .Title }}'s source is available under the MIT License and easy to
          self-host.
        </p>
        <ul>
          <li>
            <a href="https://github.com/mtlynch/logpaste"
              >https://github.com/mtlynch/logpaste</a
            >
          </li>
        </ul>
      </div>

      {{ if .FooterHTML }}
        <div class="footer">
          {{ .FooterHTML }}
        </div>
      {{ end }}
    </div>

    {{ if .ShowDocs }}
      <script src="/static/third-party/prism/prism.js" data-manual></script>
    {{ end }}
    <script src="/static/js/logpaste.js"></script>
    <script src="/static/js/app.js"></script>
  </body>
</html>
